<?php use_helper('I18N') ?>
<div id="userMng">
    <?php use_helper('crossAppLink') ?>
    <?php if ($sf_user->isAuthenticated()): ?>
    <?php $user = $sf_user->getUserProfile()?>
     <div id="userInfo"><?php echo __('User: '). $user->name?>
     </div>
    <?php endif;?>
    <div id="linksConn">
    <?php if ($sf_user->isAuthenticated()): ?>
	     <?php if($user->administrator )//or $sf_user->getGuardUser()->hasPermission('adminApp') ) 
	     	  echo link_to('<img title="'.__('Back to main application').'" src="/images/icons/32/backoffice.png"></img>', cross_app_link_to('frontend', '@homepage')) ; ?>
		<?php //echo link_to('<img title="'.__('Disconnect').'" src="/images/icons/32/logout.png"></img>', 'connexionAppli/logout')?>
	     	  
	<?php else:?>
		 	<?php // print link_to('<img title="'.__('Connect').'" src="/images/icons/32/login.png"></img>', 'connexionAppli/login'); ?>
	<?php endif;?>
	    
    </div>
</div>